.timeline-wrapper {
  padding: 8px 16px;
}

.timeline {
  box-sizing: border-box;
  padding: 0;
  color: rgb(0 0 0 / 65%);
  line-height: 1.5;

  @media (prefers-color-scheme: dark) {
    color: rgb(255 255 255 / 65%);
  }

  &.timeline-left .timeline-item .timeline-item-content {
    text-align: left;
  }

  &.timeline-alternate,
  &.timeline-right {
    .timeline-item-head,
    .timeline-item-head-custom,
    .timeline-item-tail {
      left: 50%;
    }

    .timeline-item-head {
      margin-left: -4px;
    }

    .timeline-item-head-custom {
      margin-left: 1px;
    }

    .timeline-item-left .timeline-item-content {
      left: 50%;
      width: 50%;
      text-align: left;
    }

    .timeline-item-right .timeline-item-content {
      right: 50%;
      left: -30px;

      width: 50%;
      margin-right: 18px;

      text-align: right;
    }
  }

  &.timeline-right .timeline-item-right {
    .timeline-item-head,
    .timeline-item-head-custom,
    .timeline-item-tail {
      left: 100%;
    }

    .timeline-item-content {
      right: 0;
      left: -30px;
      width: 100%;
    }
  }

  &.timeline-pending .timeline-item-last .timeline-item-tail {
    display: block;
    border-left: 2px dotted #e8e8e8;

    @media (prefers-color-scheme: dark) {
      border-left: 2px dotted #181818;
    }
  }

  &.timeline-reverse .timeline-item-last .timeline-item-tail {
    display: none;
  }

  &.timeline-reverse .timeline-item-pending {
    .timeline-item-tail {
      display: block;
      border-left: 2px dotted #e8e8e8;

      @media (prefers-color-scheme: dark) {
        border-left: 2px dotted #181818;
      }
    }

    .timeline-item-content {
      min-height: 48px;
    }
  }
}

.timeline,
.timeline-item {
  margin: 0;
  font-size: 14px;
}

.timeline-item {
  position: relative;
  padding: 0 0 20px;
}

.timeline-item-head {
  position: absolute;

  width: 10px;
  height: 10px;
  border: 2px solid transparent;
  border-radius: 100px;
}

.timeline-item-head-blue {
  border-color: #1890ff;
  color: #1890ff;
}

.timeline-item-head-red {
  border-color: #f5222d;
  color: #f5222d;
}

.timeline-item-head-green {
  border-color: #52c41a;
  color: #52c41a;
}

.timeline-item-head-custom {
  position: absolute;
  top: 5.5px;
  left: 5px;

  width: auto;
  height: auto;
  margin-top: 0;
  padding: 3px 1px;
  border: 0;
  border-radius: 0;

  line-height: 1;
  text-align: center;

  transform: translate(-50%, -50%);
}

.timeline-item-content {
  position: relative;
  top: -6px;
  margin: 0 0 0 18px;
}

.timeline-item-tail {
  position: absolute;
  top: 0.75em;
  left: 4px;

  height: 100%;
  border-left: 2px solid #e8e8e8;

  @media (prefers-color-scheme: dark) {
    border-left: 2px solid #181818;
  }
}

.timeline-item-pending {
  .timeline-item-head {
    font-size: 12px;
  }

  .timeline-item-tail {
    display: none;
  }
}

.timeline-item-last {
  padding-bottom: 0;

  .timeline-item-tail {
    display: none;
  }

  .timeline-item-content {
    min-height: 48px;
  }
}

.timeline-icon {
  width: 16px;
  height: 16px;
}

.timeline-title {
  color: var(--text-color);
  font-size: 16px;
}
